/*
 * Copyright 2011 Digia Oyj - Jaakko Purhonen <jaakko.purhonen@digia.com>
 */

#ifndef TRACVALIDATIONWIDGET_H
#define TRACVALIDATIONWIDGET_H

// TODO: possibly add passwordhelper functionality (encrypt and decrypt)
//#include "passwordhelper.h"

#include <QWidget>

namespace Trac {
namespace Internal {

namespace Ui {
    class TracValidationWidget;
}

class TracValidationWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TracValidationWidget(QWidget *parent = 0);
    ~TracValidationWidget();   
    bool isValid() const;
    void initialize();

signals:
    void validChanged(bool value);

private slots:
    void anonymousCheckBoxChanged(int state);
    void checkValid();
    void hostChanged();

private:
    void changeHostname(const QString &hostname);

    Ui::TracValidationWidget *ui;
    bool m_valid;

};

} // namespace Internal
} // namespace Trac

#endif // TRACVALIDATIONWIDGET_H
